package pnu.ssm.controller.factory;

import pnu.ssm.model.GPosition;
import pnu.ssm.model.stuff.Empty;
import pnu.ssm.model.stuff.Impossible;
import pnu.ssm.model.stuff.Road;
import pnu.ssm.model.stuff.Stuff;
import pnu.ssm.model.tile.TileEnum;

// Factory Pattern
public class StuffFactory {
	public static Stuff create(TileEnum type, GPosition pos){
		Stuff s = null;
		switch (type) {
		case IMPOSSIBLE:
			s = new Impossible(pos);
			break;
		case EMPTY:
			s = new Empty(pos);
			break;
		case ROAD:
			s = new Road(pos);
			break;
		case FACTORY:
			s = new Empty(pos);
			break;
		default:
			break;
		}
		return s;
	}
}
